package com.quanyan.vote.entity.db;

import com.quanyan.common.Plugin.Page;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class TbVoteRuleExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Page page;

    public TbVoteRuleExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setPage(Page page) {
        this.page=page;
    }

    public Page getPage() {
        return page;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andIdIsNull() {
            addCriterion("id is null");
            return (Criteria) this;
        }

        public Criteria andIdIsNotNull() {
            addCriterion("id is not null");
            return (Criteria) this;
        }

        public Criteria andIdEqualTo(Byte value) {
            addCriterion("id =", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotEqualTo(Byte value) {
            addCriterion("id <>", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThan(Byte value) {
            addCriterion("id >", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdGreaterThanOrEqualTo(Byte value) {
            addCriterion("id >=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThan(Byte value) {
            addCriterion("id <", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdLessThanOrEqualTo(Byte value) {
            addCriterion("id <=", value, "id");
            return (Criteria) this;
        }

        public Criteria andIdIn(List<Byte> values) {
            addCriterion("id in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotIn(List<Byte> values) {
            addCriterion("id not in", values, "id");
            return (Criteria) this;
        }

        public Criteria andIdBetween(Byte value1, Byte value2) {
            addCriterion("id between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andIdNotBetween(Byte value1, Byte value2) {
            addCriterion("id not between", value1, value2, "id");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesIsNull() {
            addCriterion("tp_vote_times is null");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesIsNotNull() {
            addCriterion("tp_vote_times is not null");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesEqualTo(Byte value) {
            addCriterion("tp_vote_times =", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesNotEqualTo(Byte value) {
            addCriterion("tp_vote_times <>", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesGreaterThan(Byte value) {
            addCriterion("tp_vote_times >", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesGreaterThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_times >=", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesLessThan(Byte value) {
            addCriterion("tp_vote_times <", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesLessThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_times <=", value, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesIn(List<Byte> values) {
            addCriterion("tp_vote_times in", values, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesNotIn(List<Byte> values) {
            addCriterion("tp_vote_times not in", values, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_times between", value1, value2, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteTimesNotBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_times not between", value1, value2, "tpVoteTimes");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameIsNull() {
            addCriterion("tp_vote_realname is null");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameIsNotNull() {
            addCriterion("tp_vote_realname is not null");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameEqualTo(Byte value) {
            addCriterion("tp_vote_realname =", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameNotEqualTo(Byte value) {
            addCriterion("tp_vote_realname <>", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameGreaterThan(Byte value) {
            addCriterion("tp_vote_realname >", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameGreaterThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_realname >=", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameLessThan(Byte value) {
            addCriterion("tp_vote_realname <", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameLessThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_realname <=", value, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameIn(List<Byte> values) {
            addCriterion("tp_vote_realname in", values, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameNotIn(List<Byte> values) {
            addCriterion("tp_vote_realname not in", values, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_realname between", value1, value2, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteRealnameNotBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_realname not between", value1, value2, "tpVoteRealname");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceIsNull() {
            addCriterion("tp_vote_choice is null");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceIsNotNull() {
            addCriterion("tp_vote_choice is not null");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceEqualTo(Byte value) {
            addCriterion("tp_vote_choice =", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceNotEqualTo(Byte value) {
            addCriterion("tp_vote_choice <>", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceGreaterThan(Byte value) {
            addCriterion("tp_vote_choice >", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceGreaterThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_choice >=", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceLessThan(Byte value) {
            addCriterion("tp_vote_choice <", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceLessThanOrEqualTo(Byte value) {
            addCriterion("tp_vote_choice <=", value, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceIn(List<Byte> values) {
            addCriterion("tp_vote_choice in", values, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceNotIn(List<Byte> values) {
            addCriterion("tp_vote_choice not in", values, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_choice between", value1, value2, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteChoiceNotBetween(Byte value1, Byte value2) {
            addCriterion("tp_vote_choice not between", value1, value2, "tpVoteChoice");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitIsNull() {
            addCriterion("tp_vote_limit is null");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitIsNotNull() {
            addCriterion("tp_vote_limit is not null");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitEqualTo(Integer value) {
            addCriterion("tp_vote_limit =", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitNotEqualTo(Integer value) {
            addCriterion("tp_vote_limit <>", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitGreaterThan(Integer value) {
            addCriterion("tp_vote_limit >", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitGreaterThanOrEqualTo(Integer value) {
            addCriterion("tp_vote_limit >=", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitLessThan(Integer value) {
            addCriterion("tp_vote_limit <", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitLessThanOrEqualTo(Integer value) {
            addCriterion("tp_vote_limit <=", value, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitIn(List<Integer> values) {
            addCriterion("tp_vote_limit in", values, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitNotIn(List<Integer> values) {
            addCriterion("tp_vote_limit not in", values, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitBetween(Integer value1, Integer value2) {
            addCriterion("tp_vote_limit between", value1, value2, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpVoteLimitNotBetween(Integer value1, Integer value2) {
            addCriterion("tp_vote_limit not between", value1, value2, "tpVoteLimit");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeIsNull() {
            addCriterion("tp_start_time is null");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeIsNotNull() {
            addCriterion("tp_start_time is not null");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeEqualTo(Date value) {
            addCriterion("tp_start_time =", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeNotEqualTo(Date value) {
            addCriterion("tp_start_time <>", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeGreaterThan(Date value) {
            addCriterion("tp_start_time >", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("tp_start_time >=", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeLessThan(Date value) {
            addCriterion("tp_start_time <", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeLessThanOrEqualTo(Date value) {
            addCriterion("tp_start_time <=", value, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeIn(List<Date> values) {
            addCriterion("tp_start_time in", values, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeNotIn(List<Date> values) {
            addCriterion("tp_start_time not in", values, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeBetween(Date value1, Date value2) {
            addCriterion("tp_start_time between", value1, value2, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpStartTimeNotBetween(Date value1, Date value2) {
            addCriterion("tp_start_time not between", value1, value2, "tpStartTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeIsNull() {
            addCriterion("tp_end_time is null");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeIsNotNull() {
            addCriterion("tp_end_time is not null");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeEqualTo(Date value) {
            addCriterion("tp_end_time =", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeNotEqualTo(Date value) {
            addCriterion("tp_end_time <>", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeGreaterThan(Date value) {
            addCriterion("tp_end_time >", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("tp_end_time >=", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeLessThan(Date value) {
            addCriterion("tp_end_time <", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeLessThanOrEqualTo(Date value) {
            addCriterion("tp_end_time <=", value, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeIn(List<Date> values) {
            addCriterion("tp_end_time in", values, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeNotIn(List<Date> values) {
            addCriterion("tp_end_time not in", values, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeBetween(Date value1, Date value2) {
            addCriterion("tp_end_time between", value1, value2, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpEndTimeNotBetween(Date value1, Date value2) {
            addCriterion("tp_end_time not between", value1, value2, "tpEndTime");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescIsNull() {
            addCriterion("tp_vote_desc is null");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescIsNotNull() {
            addCriterion("tp_vote_desc is not null");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescEqualTo(String value) {
            addCriterion("tp_vote_desc =", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescNotEqualTo(String value) {
            addCriterion("tp_vote_desc <>", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescGreaterThan(String value) {
            addCriterion("tp_vote_desc >", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescGreaterThanOrEqualTo(String value) {
            addCriterion("tp_vote_desc >=", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescLessThan(String value) {
            addCriterion("tp_vote_desc <", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescLessThanOrEqualTo(String value) {
            addCriterion("tp_vote_desc <=", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescLike(String value) {
            addCriterion("tp_vote_desc like", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescNotLike(String value) {
            addCriterion("tp_vote_desc not like", value, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescIn(List<String> values) {
            addCriterion("tp_vote_desc in", values, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescNotIn(List<String> values) {
            addCriterion("tp_vote_desc not in", values, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescBetween(String value1, String value2) {
            addCriterion("tp_vote_desc between", value1, value2, "tpVoteDesc");
            return (Criteria) this;
        }

        public Criteria andTpVoteDescNotBetween(String value1, String value2) {
            addCriterion("tp_vote_desc not between", value1, value2, "tpVoteDesc");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}